package com.piccolo.wrapper.client.component;

import com.piccolo.wrapper.client.component.Overlay.PRootOverlay;

/**
 * @author Maria Patrickson
 * @version 1.0
 */
public class PRoot extends PNode 
{
	/**
	 * Creates a new PRoot.
	 */
	public PRoot()
	{
		this.overlay = PRootOverlay.create();
	}
	
	/**
	 * Creates a new PRoot with the specified JavaScript overlay.
	 * @param overlay
	 */
	public PRoot(PRootOverlay overlay)
	{
		this.overlay = overlay;
	}

	/**
	 * @return The activity scheduler associatied with this root node
	 */
	public PActivityScheduler getScheduler() 
	{ 
		return new PActivityScheduler(((PRootOverlay) overlay).getScheduler()); 
	}
}
